//
//  BundleLoader.swift
//  JLCommonKit
//
//  Created by Jiang Chencheng on 2024/8/1.
//

import Foundation

public protocol BundleLoadable: AnyObject {
    static var bundle: Bundle { get }
}

public extension BundleLoadable {
    static var bundle: Bundle {
        Bundle(for: self)
    }
}

public extension BundleLoadable {
    static func path(forResource name: String?, ofType ext: String?) -> String? {
        bundle.path(forResource: name, ofType: ext)
    }
}
